<?xml version="1.0" encoding="UTF-8"?>
<html filename="docs/BSAXHelpers/TBufferedDefaultHandler.html">
<body>
<a id="#top"/>
<h1>
	                Class Summary : TBufferedDefaultHandler </h1> Default base class for SAX2 Buffered event handlers.

 <blockquote>
 <em>This module, both source code and documentation, is in the
 Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
 </blockquote>

 <p>This class is available as a convenience base class for SAX2
 applications: it provides default implementations for all of the
 callbacks in the four core SAX2 buffered handler classes:</p>

 <ul>
 <li>
        <a href="../SAX/IEntityResolver.html">IEntityResolver</a>
      </li>
 <li>
        <a href="../BSAX/IBufferedDTDHandler.html">IBufferedDTDHandler</a>
      </li>
 <li>
        <a href="../BSAX/IBufferedContentHandler.html">IBufferedContentHandler</a>
      </li>
 <li>
        <a href="../SAX/IErrorHandler.html">IErrorHandler</a>
      </li>
 </ul>

 <p>Application writers can extend this class when they need to
 implement only part of an interface; parser writers can
 instantiate this class to provide default handlers when the
 application has not supplied its own.</p>

 <p>This class replaces the deprecated SAX1
 HandlerBase class.</p>

<br/><b>Since : </b> SAX 2.0
<br/><b>See : </b> <a href="../SAX/IEntityResolver.html">IEntityResolver</a>
<br/><b>See : </b> <a href="../BSAX/IBufferedDTDHandler.html">IBufferedDTDHandler</a>
<br/><b>See : </b> <a href="../BSAX/IBufferedContentHandler.html">IBufferedContentHandler</a>
<br/><b>See : </b> <a href="../SAX/IErrorHandler.html">IErrorHandler</a>
<h2>
	              Methods
	            </h2>
<div style="padding-left:10px">
<a href="#resolveEntity">
	                  function
	                 resolveEntity(SAXString, SAXString) : IInputSource</a>
<br/>
<a href="#notationDecl">
	                  procedure
	                 notationDecl(PSAXChar, Integer, PSAXChar, Integer, PSAXChar, Integer)</a>
<br/>
<a href="#unparsedEntityDecl">
	                  procedure
	                 unparsedEntityDecl(PSAXChar, Integer, PSAXChar, Integer, PSAXChar, Integer, PSAXChar, Integer)</a>
<br/>
<a href="#setDocumentLocator">
	                  procedure
	                 setDocumentLocator(ILocator)</a>
<br/>
<a href="#startDocument">
	                  procedure
	                 startDocument()</a>
<br/>
<a href="#endDocument">
	                  procedure
	                 endDocument()</a>
<br/>
<a href="#startPrefixMapping">
	                  procedure
	                 startPrefixMapping(PSAXChar, Integer, PSAXChar, Integer)</a>
<br/>
<a href="#endPrefixMapping">
	                  procedure
	                 endPrefixMapping(PSAXChar, Integer)</a>
<br/>
<a href="#startElement">
	                  procedure
	                 startElement(PSAXChar, Integer, PSAXChar, Integer, PSAXChar, Integer, IBufferedAttributes)</a>
<br/>
<a href="#endElement">
	                  procedure
	                 endElement(PSAXChar, Integer, PSAXChar, Integer, PSAXChar, Integer)</a>
<br/>
<a href="#characters">
	                  procedure
	                 characters(PSAXChar, Integer)</a>
<br/>
<a href="#ignorableWhitespace">
	                  procedure
	                 ignorableWhitespace(PSAXChar, Integer)</a>
<br/>
<a href="#processingInstruction">
	                  procedure
	                 processingInstruction(PSAXChar, Integer, PSAXChar, Integer)</a>
<br/>
<a href="#skippedEntity">
	                  procedure
	                 skippedEntity(PSAXChar, Integer)</a>
<br/>
<a href="#warning">
	                  procedure
	                 warning(ISAXParseError)</a>
<br/>
<a href="#error">
	                  procedure
	                 error(ISAXParseError)</a>
<br/>
<a href="#fatalError">
	                  procedure
	                 fatalError(ISAXParseError)</a>
<br/>
</div>
<br/>
<hr width="100%"/>
<a name="#resolveEntity">
<p>
<b>function</b> resolveEntity(<b>const</b> publicId : SAXString; <b>const</b> systemId : SAXString) : IInputSource; </p>
</a> Resolve an external entity.

 <p>Always return nil, so that the parser will use the system
 identifier provided in the XML document.  This method implements
 the SAX default behaviour: application writers can override it
 in a subclass to do special translations such as catalog lookups
 or URI redirection.</p>

<br/><b>Parameter : </b> publicId The public identifer, or an empty string if none is
                 available.
<br/><b>Parameter : </b> systemId The system identifier provided in the XML
                 document.
<br/><b>Result : </b> The new input source, or nil to require the
         default behaviour.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/><b>See : </b> <a href="../SAX/IEntityResolver.html#resolveEntity">IEntityResolver.resolveEntity</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#notationDecl">
<p>
<b>procedure</b> notationDecl( name : PSAXChar;  nameLength : Integer;  publicId : PSAXChar;  publicIdLength : Integer;  systemId : PSAXChar;  systemIdLength : Integer); </p>
</a> Receive notification of a notation declaration.

 <p>By default, do nothing.  Application writers may override this
 method in a subclass if they wish to keep track of the notations
 declared in a document.</p>

<br/><b>Parameter : </b> name The notation name.
<br/><b>Parameter : </b> nameLength The length of the name buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> publicId The notation's public identifier, or empty if
        none was given.
<br/><b>Parameter : </b> publicIdLength The length of the publicId buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> systemId The notation's system identifier, or empty if
        none was given.
<br/><b>Parameter : </b> systemIdLength The length of the systemId buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedDefaultHandler.html#unparsedEntityDecl">TBufferedDefaultHandler.unparsedEntityDecl</a>
<br/><b>See : </b> <a href="../BSAX/IBufferedAttributes.html">IBufferedAttributes</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#unparsedEntityDecl">
<p>
<b>procedure</b> unparsedEntityDecl( name : PSAXChar;  nameLength : Integer;  publicId : PSAXChar;  publicIdLength : Integer;  systemId : PSAXChar;  systemIdLength : Integer;  notationName : PSAXChar;  notationNameLength : Integer); </p>
</a> Receive notification of an unparsed entity declaration.

 <p>By default, do nothing.  Application writers may override this
 method in a subclass to keep track of the unparsed entities
 declared in a document.</p>

<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/><b>Parameter : </b> name The unparsed entity's name.
<br/><b>Parameter : </b> nameLength The length of the name buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> publicId The entity's public identifier, or empty if none
        was given.
<br/><b>Parameter : </b> publicIdLength The length of the publicId buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> systemId The entity's system identifier.
<br/><b>Parameter : </b> systemIdLength The length of the systemId buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> notationName The name of the associated notation.
<br/><b>Parameter : </b> notationNameLength The length of the notationNameLength buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedDefaultHandler.html#notationDecl">TBufferedDefaultHandler.notationDecl</a>
<br/><b>See : </b> <a href="../BSAX/IBufferedAttributes.html">IBufferedAttributes</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#setDocumentLocator">
<p>
<b>procedure</b> setDocumentLocator(<b>const</b> locator : ILocator); </p>
</a> Receive a Locator object for document events.

 <p>By default, do nothing.  Application writers may override this
 method in a subclass if they wish to store the locator for use
 with other document events.</p>

<br/><b>Parameter : </b> locator An object that can return the location of
                any SAX document event.
<br/><b>See : </b> <a href="../SAX/ILocator.html">ILocator</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#startDocument">
<p>
<b>procedure</b> startDocument(); </p>
</a> Receive notification of the beginning of the document.

 <p>By default, do nothing.  Application writers may override this
 method in a subclass to take specific actions at the beginning
 of a document (such as allocating the root node of a tree or
 creating an output file).</p>

<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedDefaultHandler.html#endDocument">TBufferedDefaultHandler.endDocument</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#endDocument">
<p>
<b>procedure</b> endDocument(); </p>
</a> Receive notification of the end of the document.

 <p>By default, do nothing.  Application writers may override this
 method in a subclass to take specific actions at the end
 of a document (such as finalising a tree or closing an output
 file).</p>

<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedDefaultHandler.html#startDocument">TBufferedDefaultHandler.startDocument</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#startPrefixMapping">
<p>
<b>procedure</b> startPrefixMapping( prefix : PSAXChar;  prefixLength : Integer;  uri : PSAXChar;  uriLength : Integer); </p>
</a> Receive notification of the start of a Namespace mapping.

 <p>By default, do nothing.  Application writers may override this
 method in a subclass to take specific actions at the start of
 each Namespace prefix scope (such as storing the prefix mapping).</p>

<br/><b>Parameter : </b> prefix The Namespace prefix being declared.
               An empty string is used for the default element namespace,
               which has no prefix.
<br/><b>Parameter : </b> prefixLength The length of the prefix buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> uri The Namespace URI the prefix is mapped to.
<br/><b>Parameter : </b> uriLength The length of the uri buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Exception : </b> ESAXException The client may throw
            an exception during processing.
<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedDefaultHandler.html#endPrefixMapping">TBufferedDefaultHandler.endPrefixMapping</a>
<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedDefaultHandler.html#startElement">TBufferedDefaultHandler.startElement</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#endPrefixMapping">
<p>
<b>procedure</b> endPrefixMapping( prefix : PSAXChar;  prefixLength : Integer); </p>
</a> Receive notification of the end of a Namespace mapping.

 <p>By default, do nothing.  Application writers may override this
 method in a subclass to take specific actions at the end of
 each prefix mapping.</p>

<br/><b>Parameter : </b> prefix The prefix that was being mapping.
               Use the empty string when a default mapping scope ends.
<br/><b>Parameter : </b> prefixLength The length of the prefix buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Exception : </b> ESAXException The client may throw
            an exception during processing.
<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedDefaultHandler.html#startPrefixMapping">TBufferedDefaultHandler.startPrefixMapping</a>
<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedDefaultHandler.html#endElement">TBufferedDefaultHandler.endElement</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#startElement">
<p>
<b>procedure</b> startElement( uri : PSAXChar;  uriLength : Integer;  localName : PSAXChar;  localNameLength : Integer;  qName : PSAXChar;  qNameLength : Integer; <b>const</b> atts : IBufferedAttributes); </p>
</a> Receive notification of the start of an element.

 <p>By default, do nothing.  Application writers may override this
 method in a subclass to take specific actions at the start of
 each element (such as allocating a new tree node or writing
 output to a file).</p>

<br/><b>Parameter : </b> uri The Namespace URI, or the empty string if the
        element has no Namespace URI or if Namespace
        processing is not being performed.
<br/><b>Parameter : </b> uriLength The length of the uri buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> localName The local name (without prefix), or the
        empty string if Namespace processing is not being
        performed.
<br/><b>Parameter : </b> localNameLength The length of the localName buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> qName The qualified name (with prefix), or the
        empty string if qualified names are not available.
<br/><b>Parameter : </b> qNameLength The length of the qName buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> atts The attributes attached to the element.  If
        there are no attributes, it shall be an empty
        IBufferedAttributes object or nil.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedDefaultHandler.html#endElement">TBufferedDefaultHandler.endElement</a>
<br/><b>See : </b> <a href="../BSAX/IBufferedAttributes.html">IBufferedAttributes</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#endElement">
<p>
<b>procedure</b> endElement( uri : PSAXChar;  uriLength : Integer;  localName : PSAXChar;  localNameLength : Integer;  qName : PSAXChar;  qNameLength : Integer); </p>
</a> Receive notification of the end of an element.

 <p>By default, do nothing.  Application writers may override this
 method in a subclass to take specific actions at the end of
 each element (such as finalising a tree node or writing
 output to a file).</p>

<br/><b>Parameter : </b> uri The Namespace URI, or the empty string if the
        element has no Namespace URI or if Namespace
        processing is not being performed.
<br/><b>Parameter : </b> uriLength The length of the uri buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> localName The local name (without prefix), or the
        empty string if Namespace processing is not being
        performed.
<br/><b>Parameter : </b> localNameLength The length of the localName buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> qName The qualified name (with prefix), or the
        empty string if qualified names are not available.
<br/><b>Parameter : </b> qNameLength The length of the qName buffer.
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#characters">
<p>
<b>procedure</b> characters( ch : PSAXChar;  chLength : Integer); </p>
</a> Receive notification of character data inside an element.

 <p>By default, do nothing.  Application writers may override this
 method to take specific actions for each chunk of character data
 (such as adding the data to a node or buffer, or printing it to
 a file).</p>

<br/><b>Parameter : </b> ch Pointer to the characters from the XML document.
<br/><b>Parameter : </b> chLength The length of the ch buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedDefaultHandler.html#ignorableWhitespace">TBufferedDefaultHandler.ignorableWhitespace</a>
<br/><b>See : </b> <a href="../SAX/ILocator.html">ILocator</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#ignorableWhitespace">
<p>
<b>procedure</b> ignorableWhitespace( ch : PSAXChar;  chLength : Integer); </p>
</a> Receive notification of ignorable whitespace in element content.

 <p>By default, do nothing.  Application writers may override this
 method to take specific actions for each chunk of ignorable
 whitespace (such as adding data to a node or buffer, or printing
 it to a file).</p>

<br/><b>Parameter : </b> ch Pointer to the characters from the XML document.
<br/><b>Parameter : </b> chLength The length of the ch buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedDefaultHandler.html#characters">TBufferedDefaultHandler.characters</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#processingInstruction">
<p>
<b>procedure</b> processingInstruction( target : PSAXChar;  targetLength : Integer;  data : PSAXChar;  dataLength : Integer); </p>
</a> Receive notification of a processing instruction.

 <p>By default, do nothing.  Application writers may override this
 method in a subclass to take specific actions for each
 processing instruction, such as setting status variables or
 invoking other methods.</p>

<br/><b>Parameter : </b> target The processing instruction target.
<br/><b>Parameter : </b> targetLength The length of the target buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> data The processing instruction data, or the empty string
        if none was supplied.  The data does not include any
        whitespace separating it from the target.
<br/><b>Parameter : </b> dataLength The length of the data buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#skippedEntity">
<p>
<b>procedure</b> skippedEntity( name : PSAXChar;  nameLength : Integer); </p>
</a> Receive notification of a skipped entity.

 <p>By default, do nothing.  Application writers may override this
 method in a subclass to take specific actions for each
 processing instruction, such as setting status variables or
 invoking other methods.</p>

<br/><b>Parameter : </b> name The name of the skipped entity.  If it is a
        parameter entity, the name will begin with '%', and if
        it is the external DTD subset, it will be the string
        &quot;[dtd]&quot;.
<br/><b>Parameter : </b> nameLength The length of the name buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#warning">
<p>
<b>procedure</b> warning(<b>const</b> e : ISAXParseError); </p>
</a> Receive notification of a parser warning.

 <p>The default implementation does nothing.  Application writers
 may override this method in a subclass to take specific actions
 for each warning, such as inserting the message in a log file or
 printing it to the console.</p>

<br/><b>Parameter : </b> e The warning information encoded as an exception.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/><b>See : </b> <a href="../SAX/IErrorHandler.html#warning">IErrorHandler.warning</a>
<br/><b>See : </b> <a href="../SAX/ESAXParseException.html">ESAXParseException</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#error">
<p>
<b>procedure</b> error(<b>const</b> e : ISAXParseError); </p>
</a> Receive notification of a recoverable parser error.

 <p>The default implementation does nothing.  Application writers
 may override this method in a subclass to take specific actions
 for each error, such as inserting the message in a log file or
 printing it to the console.</p>

<br/><b>Parameter : </b> e The warning information encoded as an exception.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/><b>See : </b> <a href="../SAX/IErrorHandler.html#warning">IErrorHandler.warning</a>
<br/><b>See : </b> <a href="../SAX/ESAXParseException.html">ESAXParseException</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#fatalError">
<p>
<b>procedure</b> fatalError(<b>const</b> e : ISAXParseError); </p>
</a> Report a fatal XML parsing error.

 <p>The default implementation throws a SAXParseException.
 Application writers may override this method in a subclass if
 they need to take specific actions for each fatal error (such as
 collecting all of the errors into a single report): in any case,
 the application must stop all regular processing when this
 method is invoked, since the document is no longer reliable, and
 the parser may no longer report parsing events.</p>

<br/><b>Parameter : </b> e The error information encoded as an exception.
<br/><b>Exception : </b> ESAXException Any SAX exception.
<br/><b>See : </b> <a href="../SAX/IErrorHandler.html#fatalError">IErrorHandler.fatalError</a>
<br/><b>See : </b> <a href="../SAX/ESAXParseException.html">ESAXParseException</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
</body>
</html>